import HallView from "./view/HallView";
import { HallLanguage } from "./data/HallLanguage";
import HallHandler from "./net/HallHandler";
import { LobbyService } from "../../../scripts/common/net/LobbyService";
import { Entry } from "../../../quick/core/entry/Entry";
import { registerEntry } from "../../../quick/defines/Decorators";
import { Macro } from "../../../quick/defines/Macros";

@registerEntry("HallEntry",Macro.BUNDLE_HALL,HallView)
class HallEntry extends Entry {
    protected language = new HallLanguage;

    protected addNetHandler(): void {
        App.handlerManager.get(HallHandler);
    }
    protected removeNetHandler(): void {
        //大厅的到登录界面会自动初清除
        // Manager.netHelper.destoryHandler(HallHandler);
    }
    protected loadResources(completeCb: () => void): void {
        App.protoManager.load(this.bundle).then((isSuccess)=>{
            completeCb();
        })
    }
    protected initData(): void {
        //初始化网络
        App.serviceManager.get(LobbyService,true);
    }
    protected pauseMessageQueue(): void {
        
    }
    protected resumeMessageQueue(): void {
        
    }
}
